package hu.cskassai.sad.gui.frames;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JComboBox;
import javax.swing.BoxLayout;
import java.awt.GridLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;

public class AlgorithmChooserDialog extends JDialog {
	
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			AlgorithmChooserDialog dialog = new AlgorithmChooserDialog();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * Create the dialog.
	 */
	public AlgorithmChooserDialog() {
		setTitle("Algorithm Chooser");
		setBounds(100, 100, 401, 162);
		getContentPane().setLayout(new BorderLayout());
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
		{
			JPanel panel = new JPanel();
			getContentPane().add(panel, BorderLayout.CENTER);
			GridBagLayout gbl_panel = new GridBagLayout();
			gbl_panel.columnWidths = new int[]{0, 0, 0, 0};
			gbl_panel.rowHeights = new int[]{0, 0, 0, 0};
			gbl_panel.columnWeights = new double[]{0.0, 0.0, 1.0, Double.MIN_VALUE};
			gbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};
			panel.setLayout(gbl_panel);
			{
				JComboBox algorithmComboBox = new JComboBox();
				GridBagConstraints gbc_algorithmComboBox = new GridBagConstraints();
				gbc_algorithmComboBox.insets = new Insets(0, 0, 5, 5);
				gbc_algorithmComboBox.fill = GridBagConstraints.HORIZONTAL;
				gbc_algorithmComboBox.gridx = 1;
				gbc_algorithmComboBox.gridy = 0;
				panel.add(algorithmComboBox, gbc_algorithmComboBox);
			}
			{
				JButton btnAddNewAlgorithm = new JButton("Add new algorithm");
				GridBagConstraints gbc_btnAddNewAlgorithm = new GridBagConstraints();
				gbc_btnAddNewAlgorithm.insets = new Insets(0, 0, 0, 5);
				gbc_btnAddNewAlgorithm.gridx = 1;
				gbc_btnAddNewAlgorithm.gridy = 2;
				panel.add(btnAddNewAlgorithm, gbc_btnAddNewAlgorithm);
			}
		}
	}
}
